
import sounddevice as sd

from utils import simpledaw

daw = simpledaw.SimpleDAW(plugin='C:/VstPlugins/64bit/Sylenth1.dll')


def validate_params(prediction, validation_config):
    daw.set_params(list(prediction[0, ...]))
    audio = daw.render(2.)
    print('正在播放预测参数')
    sd.play(audio, validation_config['source_sample_rate'], blocking=True)
    print('播放结束')
